package vip.xiaonuo.common.util;

import lombok.extern.slf4j.Slf4j;

import java.util.HashMap;
import java.util.Map;

/**
 * 空号检测
 */
@Slf4j
public class CommonInvalidPhoneUtil {
    public static void main(String[] args) {
        Map<String, Object> headerMap = new HashMap<>();
        headerMap.put("appId", "893d45c01f1e4828912c4b8087fe1263");
        headerMap.put("appKey", "cf1de62ef494446eb348fc02d0bb09b9");
        headerMap.put("mobile", "13488447753,15172540756,13714686843,15256979392");
        String s = CommonHttpUtil.postByForm("http://api.shoujikonghao.com/api/end/high", headerMap, "");
        log.info("空号检测 {} ", s);
    }

    //校验空号
    public static String invalidPhone(String url, Map<String, Object> headerMap) {
        log.info("开始调用空号检测接口");
        String s = CommonHttpUtil.postByForm(url, headerMap, "");
        log.info("空号检测 {} ", s);
        return s;
    }
}
